<!--致开科技字样模块-->
<template>
  <!-- 为 ECharts 准备一个定义了宽高的 DOM -->
  <div>
    <div id="main" class="pt-2" style="width: 100%;height:100%;"></div>
  </div>
</template>


<script>
import * as echarts from 'echarts';

export default {
  name: "loginTest",
  data() {
    return {
      typColor: '#FFFF00',
    }
  },
  mounted() {
    this.initChart();
  },
  methods: {

    // 初始化 表格组件
    initChart() {
// 基于准备好的dom，初始化echarts实例
      const myChart = echarts.init(document.getElementById('main'));
      const option = {
        graphic: {
          elements: [
            {
              type: 'text',
              left: 'center',
              top: 'center',
              style: {
                text: 'welcome',
                fontSize: 55,
                fontWeight: 'bold',
                lineDash: [0, 200],
                lineDashOffset: 0,
                fill: 'transparent',
                stroke: this.typColor,
                lineWidth: 1
              },
              keyframeAnimation: {
                duration: 4000,
                loop: true,
                keyframes: [
                  {
                    percent: 0.5,
                    style: {
                      fill: 'transparent',
                      lineDashOffset: 200,
                      lineDash: [200, 0]
                    }
                  },
                  {
                    // Stop for a while.
                    percent: 0.8,
                    style: {
                      fill: 'transparent'
                    }
                  },
                  {
                    percent: 1,
                    style: {
                      fill: this.typColor
                    }
                  }
                ]
              }
            }
          ]
        }
      };
// 绘制图表
      myChart.setOption(option);
    },
  }
}
</script>

<style scoped>

</style>
